# import webbrowser
# import requests


# session = requests.Session()
# payload = {'username': 'Morvan', 'password': 'password'}
# r = session.post('http://pythonscraping.com/pages/cookies/welcome.php', data=payload)
# print(r.cookies.get_dict())

# # {'username': 'Morvan', 'loggedin': '1'}


# r = session.get("http://pythonscraping.com/pages/cookies/welcome.php")
# print(r.text)

# # Hey Morvan! Looks like you're still logged into the site!

import os
from urllib.request import urlretrieve #取过来

os.makedirs('./img/', exist_ok=True)

IMAGE_URL = "https://morvanzhou.github.io/static/img/description/learning_step_flowchart.png"

urlretrieve(IMAGE_URL, './img/image1.png')
